import { request } from "../api/request";

/**
 * 获取AI求职建议
 * @param {string} content - 用户简历内容
 * @returns {Promise} 返回AI的建议内容
 * @throws {Error} 当请求失败时抛出错误
 */
export const getAIAdviceApi = (content) => {
  return request({
    url: "/ai/advice",
    method: "POST",
    params: { content },
  });
};

/**
 * AI求职聊天助手
 * @param {string} content - 用户简历内容
 * @returns {Promise} 返回AI的建议内容
 * @throws {Error} 当请求失败时抛出错误
 */
export const AIChatApi = (content) => {
  return request({
    url: "/ai/chat",
    method: "POST",
    params: { content },
  });
};
